<template>
     <el-dropdown trigger="click" @command="setAssemblySize">
          <i :class="'iconfont icon-contentright'" class="toolBar-icon"></i>
          <template #dropdown>
               <el-dropdown-menu>
                    <el-dropdown-item v-for="item in assemblySizeList" :key="item" :disabled="assemblySize === item" :command="item">
                         {{assemblySizeListMap[item]}}
                    </el-dropdown-item>
               </el-dropdown-menu>
          </template>
     </el-dropdown>
</template>
<script setup>
import { computed, reactive } from '@vue/runtime-core'
import { useStore } from 'vuex'
const store = useStore()
const assemblySize = computed(() => {
     return store.getters.getAssemblySize
})
const assemblySizeList = reactive(['default', 'large', 'small'])
const assemblySizeListMap = reactive({
     default: '默认',
     large: '大型',
     small: '小型'
})
const setAssemblySize = (command) => {
     store.commit('changeAssemblySize',command)
}
</script>